<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <button @click="fn">{{isshow?"隐藏文字":"显示文字"}}</button>
    <p v-show="isshow">黑马程序员</p>
  </div>
  <script src="./vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        isshow: true
      },
      methods: {
        fn() {
          this.isshow = !this.isshow
        }
      }
    })
  </script>
</body>

</html>